<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html>
<html lang="zh-CN">
<head>

<%@ include file="common.jsp"%>
<title>首页</title>
</head>

<body>
	<%@ include file="header.jsp"%>

	<div class="container-fluid">
		<div class="row main">

			<h1 class="page-header">hello world</h1>

			<c:forEach var="item" items="${groups }">
				<div class="col-lg-4">
					<h2>${item.groupName }<span style="  font-size: 15px;">    (昨日)</span></h2>
					<div class="table-responsive">
						<table class="table table-striped">
							<thead>
								<tr>
									<th>时间</th>
									<th>姓名</th>
									<th>步数</th>
									<th>名次</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${stepMap[item.id]}" var="step">
									<tr>
										<td><fmt:formatDate value="${step.stepDate }" pattern="yyyy-MM-dd" /></td>
										<td>${step.walker.realyName }</td>
										<td>${step.stepCount }</td>
										<td>${idx.index+1 }</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
					<%-- <p>
						<a class="btn btn-primary" href="${path }/step/list" role="button">更多 »</a>
					</p> --%>
				</div>
			</c:forEach>

		</div>
	</div>

	<%@ include file="footer.jsp"%>
</body>
</html>